package com.security.service.impl;

import com.security.model.InterceptUrl;
import com.security.service.InterceptAddressService;
import com.security.mapper.InterceptUrlMapper;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DbInterceptAddressServiceImpl implements InterceptAddressService {

	private final InterceptUrlMapper interceptUrlMapper;

	public DbInterceptAddressServiceImpl(InterceptUrlMapper interceptUrlRepository) {
		this.interceptUrlMapper = interceptUrlRepository;
	}

	@Cacheable("interceptUrls")
	@Override
	public List<InterceptUrl> getInterceptUrls() {
		return interceptUrlMapper.selectList(null);
	}
}